<?php
session_start();
if(session_is_registered($_GET["user_id"])){}
else 
die("<a href='../index.php'>PLEASE LOGIN AGAIN... </a>");
?>

<html>
<head>
	<script type="text/javascript" src="../lib/jquery.js"></script>
	<script type="text/javascript" src="../lib/ajaxfileupload.js"></script>
	
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>E-portfolio</title>


<script src="../lib/calender_date_picker.js" type="text/javascript" language="javascript"></script>
<link rel="stylesheet" type="text/css" media="screen,projection" href="../css/calender.css" />


<link href="../tabs/css/tabs.css" media="screen" type="text/css" rel="stylesheet">
<link href="../css/home.css" 	  media="screen" type="text/css" rel="stylesheet">
<link href="../css/screen.css"    media="screen" type="text/css" rel="stylesheet">

<script src="../lib/ajax_json.js" type="text/javascript"></script>
<script src="../lib/ajax_fnc.js" type="text/javascript" language="javascript"></script>

<script src="../tabs/scripts/jquery/jquery-ui.core.js" language="javascript"></script>
<script src="../tabs/scripts/jquery/jquery-ui.tabs.js" language="javascript"></script>
<script type="text/javascript">
//see jQuery tabs UI for details on function params:
//http://docs.jquery.com/UI/../tabs/tabs#options
//
  $(document).ready(function(){
    $("#container > ul").tabs({ 
			fx: { opacity: 'toggle' }, 
			cache: true,
			spinner: ''
		});
  });
</script>

<script type="text/javascript">
	function ajaxFileUpload(user_id)
	{
		$("#loading")
		.ajaxStart(function(){
			$(this).show();
		})
		.ajaxComplete(function(){
			$(this).hide();
		});

		$.ajaxFileUpload
		(
			{
				url:'doajaxfileupload.php?user_id='+user_id,
				secureuri:false,
				fileElementId:'fileToUpload',
				dataType: 'json',
				success: function (data, status)
				{
					if(typeof(data.error) != 'undefined')
					{
						if(data.error != '')
						{
							alert(data.error);
						}else
						{
//							alert(data.error);
							$("#per_photo").attr("src","../members/upload/"+data.msg);
						}
					}
				},
				error: function (data, status, e)
				{
					alert(e);
				}
			}
		)
		
		return false;

	}
	</script>	
</head>
<body>




<table align="center">
<tr><td>
<div id="up_banner" >
<label style="float:left"> E-portfolio </label>
</div>
<br><br>
<?php $user_id = $_GET["user_id"];?>

<div class="div_main"> 
	<div id="container" style="color:white">
		<ul>
			<li><a href="info.php?user_id=<?=$user_id?>">Info Personnelle</a></li>
      		<li><a href="cursus.php?user_id=<?=$user_id?>">Cursus</a></li>
			<li><a href="exp.php?user_id=<?=$user_id?>">Experience</a></li>
			<li><a href="albums.php?user_id=<?=$user_id?>">Photos</a></li>
<!--			<li><a href="files.php">files</a></li>-->
			<li> <a onclick="window.open('files.php?user_id=<?=$user_id?>','Files','width=400,height=400,left=100,top=100')" id='pointer'> Fichiers </a> </li>
			<li><a href="logout.php?user_id=<?=$user_id?>">Deconnecter</a></li>
		</ul>
		
	</div>
</div>
</td></tr>

</table>
<?php
include("../footer.php");
?>


<!-- This code is just to display the calendar, it must be under the body level directly  -->
<table id="calenderTable">
<tbody id="calenderTableHead">
<tr>
 <td colspan="4" align="left">
	<select onChange="showCalenderBody(createCalender(document.getElementById('selectYear').value, this.selectedIndex, false));" id="selectMonth">
	 <option value="0">January</option>
	 <option value="1">February</option>
	 <option value="2">March</option>
	 <option value="3">April</option>
	 <option value="4">May</option>
	 <option value="5">June</option>
	 <option value="6">July</option>
	 <option value="7">August</option>
	 <option value="8">September</option>
	 <option value="9">October</option>
	 <option value="10">November</option>
	 <option value="11">December</option>
	</select>
 </td>
 <td colspan="2" align="center"><select onChange="showCalenderBody(createCalender(this.value, document.getElementById('selectMonth').selectedIndex, false));" id="selectYear"></select></td>
 <td align="right"><a href="#" onClick="closeCalender();">X</a></td>
</tr>
</tbody>
<tbody id="calenderTableDays">
<tr style="">
 <td>Su</td><td>Mo</td><td>Tu</td><td>We</td><td>Thu</td><td>Fr</td><td>Sa</td>
</tr>
</tbody>
<tbody id="calender"></tbody>
</table>
<!-- This is the end of the calendar code  -->


</body>
</html>
